package com.storlead.shiro.controller;

import com.storlead.shiro.util.Result;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: Timo
 * @Date: 2019/2/14 16:33
 * @Description: 字典类使用
 */
@RestController
@RequestMapping("/data")
public class DataDictController {

    @GetMapping("/all")
    @RequiresPermissions("data:all")
    public Result all(){
        return new Result(1);
    }

    @GetMapping("/detail")
    @RequiresPermissions("data:detail")
    public Result detail(){
        return new Result(1,"detail","detail");
    }
}
